<?php session_start (); if (isset($_SESSION['login']) && isset($_SESSION['mdp']) && $_SESSION['Autorisation'] == 3) {?>
<html>
<head>
<link rel="stylesheet" href="styleadmin.css" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<title>sans titre 1</title>
</head>

<body>

	<div id="container">
		<div id="top">
			<?php include '../header.php'; ?>
		</div>
			
		<div id="leftnav">
			<?php include 'menu-administration.php'; ?>
		</div>
	
		<div id="content">
		<FORM METHOD="POST" ACTION="edition.php">
			<?php
			try
			{
				include '../include/Data.php';
				$NumArticle = $_POST['choix'];
				$req = mysql_query("SELECT NumArticle, Titre, DateArticle, Contenu FROM article WHERE NumArticle=".$NumArticle."");
				$ligne = mysql_fetch_assoc($req);
				mysql_close($connexion);
			}
				catch(Exception $e)
				{
					// En cas d'erreur pr�c�demment, on affiche un message et on arr�te tout
					die('Erreur : '.$e->getMessage());
				}
			?>
		<TABLE BORDER="0">
		<tr>
			<th>NumArticle</th>
			<th><input name="NumArticle" value="<?php echo $ligne['NumArticle']; ?>"></th>
		</tr>
		<tr>
			<th>Nom Article</th>
			<th><input name="Titre" value="<?php echo $ligne['Titre']; ?>"></th>
		</tr>
		
		<tr>
			<th>Contenu</th>
			<th><textarea name="Contenu" rows='10%' cols='75'><?php echo $ligne['Contenu']; ?></textarea></th>
		</tr>

		<tr>
			<th>Date</th>
			<th><input name="DateArticle" value="<?php echo $ligne['DateArticle']; ?>"></th>
		</tr>
		<tr>
			<th><b>Valider</b></th>
			<th><input type="submit" value="Envoi"></th>
		</tr>
		</TABLE>
		</FORM>
		</div>
	
		
		<div id="footer">
		<?php include '../footer.php'; ?>
		</div>
 	</div>
	
</body>
</html>
<?php } else { header("Refresh: 0; URL=../index.php"); }?>